﻿@page "/form"


<TestForm Model="this">
    <DataAnnotationsValidator/>
    <ValidationSummary/>
    <FormInput @bind-Value="Name"/>
    <ValidationMessage For="@(()=>Name)"/>
    <input type="submit" value="提交" />
</TestForm>
@*<FormInput @bind-Value="Name"/>*@
@Name
@using System.ComponentModel.DataAnnotations
@code{
        [Required]
        [StringLength(6)]
        public string? Name { get; set; }
    
}